const config = require('./config.json')
const axios = require('axios')
module.exports = (req, res, next) => {
  axios
    .get(`https://free-api.heweather.com/s6/weather/now`, {
      key: config.heweather_key,
      location: 'CN101010100',
      lang: 'en',
      unit: 'm'
    })
    .then(result => {
      res.json(result.data)
    })
    .catch(err => {
      res.json(err)
    })
}
